{template 'public/header'}
{template 'public/comhead'}
<link rel="stylesheet" type="text/css" href="../addons/zh_jypx/template/public/ygcss.css">
<style type="text/css">
    input[type="radio"] + label::before {
        content: "\a0"; /*不换行空格*/
        display: inline-block;
        vertical-align: middle;
        font-size: 16px;
        width: 1em;
        height: 1em;
        margin-right: .4em;
        border-radius: 50%;
        border: 2px solid #ddd;
        text-indent: .15em;
        line-height: 1; 
    }
    input[type="radio"]:checked + label::before {
        background-color: #44ABF7;
        background-clip: content-box;
        padding: .1em;
        border: 2px solid #44ABF7;
    }
    input[type="radio"] {
        position: absolute;
        clip: rect(0, 0, 0, 0);
    }
    .yg_inp>input{margin-bottom: 10px;}

    .storeimg{

        max-width: 300px;

        max-height: 300px;

    }

    .bigzheng,.bigfan{min-width: 500px;min-height: 500px;max-width: 600px;max-height: 600px;}

    .xuanbtn1,.xuanbtn2,.xuanbtn3,.xuanbtn4{

        position: absolute;

        bottom: 10px;

        right: 5%;



    }

</style>

<ul class="nav nav-tabs">    
    <span class="ygxian"></span>
    <div class="ygdangq">当前位置:</div>  
    <li class="active"><a href="{php echo $this->createWebUrl('orderdetails')}">查看悬赏详情</a></li>
</ul>
<div class="main ygmain">
    <form action="" method="post" class="form-horizontal form" enctype="multipart/form-data">
        <!--<input type="hidden" name="parentid" value="{$parent['id']}" />-->
        <div class="panel panel-default ygdefault">
            <div class="panel-heading wyheader">
                悬赏详情
            </div>
            <div class="panel-body">
                 <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">悬赏分类</label>
                    <div class="col-sm-9">
                        <input type="text" name="name" class="form-control" value="{$info['name']}" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">悬赏标题</label>
                    <div class="col-sm-9">
                        <input type="text" name="title" class="form-control" value="{$info['title']}" />
                    </div>
                </div>
                {loop $info  $row}

                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">悬赏图片</label>
                    <div class="col-sm-9">
                        <!--<img src="{$info['thumb']}" alt="" style="height: 60px;width: 60px">-->
                        <img class="storeimg attzheng" id="usertu1{$info['id']}" src="{media $row['img']}" data-toggle="modal" data-target="#myModalu{$info['id']}" style="height: 60px;width: 60px">
                        <!-- —————————放大图片——————————— -->
                        <div class="modal fade" id="myModalu{$info['id']}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">

                            <div class="modal-dialog" role="document">

                                <div class="modal-content">

                                    <div class="modal-header">

                                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>

                                        <h3 class="modal-title" id="myModalLabel">凭证图片</h3>

                                    </div>

                                    <div class="modal-body" style="padding: 5px 30px 15px;text-align: center;">

                                        <img class="bigzheng zhuan1" src="{media $row['img']}">


                                    </div>
                                    <div class="modal-footer">

                                        <button type="button" class="btn btn-default" data-dismiss="modal">确定</button>
                                    </div>

                                </div>

                            </div>

                        </div>
                        <!-- —————————放大图片——————————— -->

                    </div>
                </div>
                {/loop}
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">悬赏详情</label>
                    <div class="col-sm-9">
                        {php echo tpl_ueditor('description',$info['content']);}
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">悬赏金额</label>
                    <div class="col-sm-9">
                        <input type="text" name="total" class="form-control" value="{$info['total']}" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">所需人数</label>
                    <div class="col-sm-9">
                        <input type="text" name="number" class="form-control" value="{$info['number']}" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">结束时间</label>
                    <div class="col-sm-9">
                        <input type="text" name="end_time" class="form-control" value="{$info['end_time']}" readonly>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">手机号</label>
                    <div class="col-sm-9">
                        <input type="text" name="phone" class="form-control" value="{$info['phone']}" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">微信号</label>
                    <div class="col-sm-9">
                        <input type="text" name="wx_number" class="form-control" value="{$info['wx_number']}" />
                    </div>
                </div>
                <div class="form-group">

                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">状态</label>

                    <div class="col-sm-9">

                        <select name="status" class="col-md-4">

                            {if $info['status']==0}

                            <option value="0" selected>待审核</option>

                            <option value="1" >已通过</option>

                            <option value="2" >已拒绝</option>

                            {elseif $info['status']==1}

                            <option value="0" >待审核</option>

                            <option value="1" selected>已通过</option>

                            <option value="2" >已拒绝</option>

                            {elseif $info['status']==2}

                            <option value="0" >待审核</option>

                            <option value="1">已通过</option>

                            <option value="2"  selected>已拒绝</option>

                            {else}

                            <option value="0" >待审核</option>

                            <option value="1">已通过</option>

                            <option value="2">已拒绝</option>

                            {/if}

                        </select>

                    </div>

                </div>




            </div>
            </div>



        <div class="form-group">
            <input type="submit" name="submit" value="提交" class="btn col-lg-3" style="color: white;background-color: #44ABF7;"/>
            <input type="hidden" name="token" value="{$_W['token']}" />
            <input type="hidden" name="id" value="{$info['id']}" />
        </div>
    </form>
</div>
<script type="text/javascript">
    $(function(){
        // $(".ygyi1").show();
        // $(".ygyi2").hide();  
        // $(".ygyi3").hide();  
        
        "{if $info}"
            "{if $info['state']=='1'}"
                $('.ygyi2').hide();
                $('.ygyi3').hide();
            "{/if}"
            "{if $info['state']=='2'}"
                $('.ygyi1').hide();
                $('.ygyi3').hide();
            "{/if}" 
            "{if $info['state']=='3'}"
                $('.ygyi1').hide();
                $('.ygyi2').hide();
            "{/if}"            
        "{else}"
            $('.ygyi2').hide();
            $('.ygyi3').hide();
        "{/if}"
        $("select#type").change(function(){
            if($(this).val()=='1'){
                console.log($(this).val())
                $(".ygyi1").show();
                $(".ygyi2").hide();
                $(".ygyi3").hide();  
            }else if($(this).val()=='2'){
                console.log($(this).val())
                $(".ygyi1").hide();
                $(".ygyi2").show();
                $(".ygyi3").hide();  
            }else if($(this).val()=='3'){
                console.log($(this).val())
                $(".ygyi1").hide();
                $(".ygyi2").hide();
                $(".ygyi3").show();  
            }
         })
        $("#frame-1").show();
        $("#yframe-1").addClass("wyactive");
    })
</script>
